<?php
/**
 * Page description
 *
 * @package 
 * @version {: }
 */

/**
 * Class description
 * 
 * @package 
 * @subpackage 
 * @author Author Name <email>
 */
class System_View_Helper_Hyperlink extends System_View_Helper_Abstract{
    /**
     * holds the rules for this helper
     * 
     * @var array
     * @access protected
     */
    protected $_rules = array(
        
    );
    
    /**
     * processes the view helper
     *
     * @access public
     * @return Object - System_View_Helper_Hyperlink
     */
    public function process(){
        $href   = '#';
        $id     = false;
        $class  = false;
        $text   = 'Link Helper Link';

        while($this->_model->current()){
            $atts = '';
            
            /**
             * overwrite the default values with the ones found in the rules property
             */
            foreach($this->_rules as $key => $rule){
                $$key = $this->trueValue($rule);
            }

            /**
             * set the attributes for the link
             */
            if($id) $atts .= ' id="'. $id .'"';
            if($class) $atts .= ' class="'. $class .'"';
            
            $link = Ele::aTag($text, $href, $atts);
            
            $this->_affected_data[]		= $link;
            $this->_processed_data[] 	= $link;
			
			$this->_model->next();
        }
        
        return $this;
    }
    
    public function processChain(){
    
        return $this;
    }
}